package de.tslarusso.flashcache.events
{
	import de.tslarusso.flashcache.cache.CacheItem;
	
	import flash.events.Event;

	public class CacheItemEvent extends Event
	{
		
		public static const ON_EXPIRED:String = "onExpired";
		
		public var cacheItem:CacheItem
		
		public function CacheItemEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false , cacheItem:CacheItem = null)
		{
			super(type, bubbles, cancelable);
			this.cacheItem = cacheItem;
		}
		
		public override function clone():Event 
		{ 
			return new CacheItemEvent(type, bubbles, cancelable , cacheItem);
		} 
		
		public override function toString():String 
		{ 
			return formatToString("CacheItemEvent", "type", "bubbles", "cancelable", "eventPhase", "cacheItem"); 
		}
		
	}
}